import { initRouter } from '@/router'
import 'amfe-flexible'
import 'nprogress/nprogress.css'
import Vant from 'vant'
import 'vant/lib/index.less'
// import VConsole from 'vconsole/dist/vconsole.min.js'
import Vue from 'vue'
import App from './App.vue'
import './assets/index.css'
import bootstrap from './bootstrap'
import store from './store'
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css' 
// new VConsole()

//图片预览的插件
/* Vue.use(Viewer, {
  defaultOptions: {
      zIndex: 9999
  }
}) */
Vue.use(Viewer,{
  setDefaults: {
    Options: { 'inline': false, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': false, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
  }
})
Vue.use(Vant)

Vue.config.productionTip = false

const router = initRouter()
Vue.prototype.$message = {
  success(content) {
    Vue.prototype.$notify({
      message: content,
      type: 'success'
    })
  },
  error(content) {
    Vue.prototype.$notify({
      message: content,
      type: 'danger'
    })
  },
  warning(content) {
    Vue.prototype.$notify({
      message: content,
      type: 'warning'
    })
  },
  info(content) {
    Vue.prototype.$notify({
      message: content,
      type: 'primary'
    })
  }
}
bootstrap({ router, store, i18n: null, message: Vue.prototype.$message })

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
